Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the at-threads a no-op if nthreads()==0 #33964

Closed
wants to merge 1 commit into from

Conversation

mauro3
Copy link
Contributor

@mauro3 mauro3 commented Nov 27, 2019

In one of my codes (an MCMC sampler) I saw an overhead of using the Threads.@threads macro even though julia was started with nthreads()==1. I'm not sure whether this is expected (trying to reproduce on simple cases, I saw no performance impact). For my test-case this works, but I have no idea on whether this is ok.

@yuyichao
Copy link
Contributor

No, you must not do this at compile time.
Ref #32181

The runtime case is already handled.

@yuyichao yuyichao closed this Nov 27, 2019
@mauro3
Copy link
Contributor Author

mauro3 commented Nov 27, 2019

So, this is resolved with #32477? It there a work-around until the time that PR is merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants